home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-09-23 | 1.6 KB | 62 lines | [TEXT/MPS ] |
- // Constants, resource definitions, etc.
-
- #define kErrStrings 129
-
- /* The following are indicies into STR# resources. */
- #define eNoMemory 1
- #define eNoWindow 2
-
- #define kMinSize 48 // min heap needed in K
-
- #define rMenuBar 128 /* application's menu bar */
- #define rAboutAlert 128 /* about alert */
- #define rDocWindow 128 /* application's window */
-
- #define mApple 128 /* Apple menu */
- #define iAbout 1
-
- #define mFile 129 /* File menu */
- #define iNew 1
- #define iClose 4
- #define iQuit 12
-
- #define mEdit 130 /* Edit menu */
- #define iUndo 1
- #define iCut 3
- #define iCopy 4
- #define iPaste 5
- #define iClear 6
-
- #define myMenu 131 /* Sample menu */
- #define item1 1
- #define item2 2
- #define item3 3
- #define item5 5
-
- class TMacTutorApp : public TApplication {
- public:
- TMacTutorApp(void); // Our constructor
- void EventLoop(void);
- // overridden event loop for high level event support
-
- // handle the four required apple events
- void DoOpen(void);
- void DoNew(void);
- void DoPrint(void);
- void Terminate(void);
- void DoHighLevelEvent(void);
-
- private:
- // routines from TApplication we are overriding
- long HeapNeeded(void);
- unsigned long SleepVal(void);
- void AdjustMenus(void);
- void DoMenuCommand(short menuID, short menuItem);
- };
-
- // kMaxOpenDocuments is used to determine whether a new document can be opened
- // or created. We keep track of the number of open documents, and disable the
- // menu items that create a new document when the maximum is reached. If the
- // number of documents falls below the maximum, the items are enabled again. */
- const short kMaxOpenDocuments = 4;
-